package com.gang.mars.basic.generictype.demo2;

import java.util.ArrayList;

/**
 * 泛型类
 * @author gang.chen
 * @since  2021/7/13 12:19
 */
public class AppleTest {

    public static void main(String[] args) {

        Apple04<Integer> apple04 = new Apple04<>();

        ArrayList<String> arrayList = new ArrayList<>();
        arrayList.add("手机");
        arrayList.add("手表");

        //调用方法时，指定泛型类型
        String prize = apple04.getAppleE(arrayList);
        System.out.println(prize);

        Apple06 apple06 = new Apple06();
        Apple04<Integer> apple14 = new Apple04<>();
        Integer scan = apple14.scan("gang.chen", apple06);
        System.out.println(scan);
    }
}
